{% extends "process.html" %}
{% block process_content %}
    <table class="table">
        <thead>
            <tr>
                <th>文件描述符</th>
                <th>协议簇</th>
                <th>套接字类型</th>
                <th>本机地址</th>
                <th>本机端口</th>
                <th>远程地址</th>
                <th>远程端口</th>
                <th>状态</th>
            </tr>
        </thead>
        <tbody>
            {% for c in connections %}
                <tr>
                    <td>{{ c.fd }}</td>
                    <td>{{ c.family }}</td>
                    <td>{{ c.type }}</td>
                    <td>{{ c.local_addr_host if c.local_addr_host}}</td>
                    <td>{{ c.local_addr_port if c.local_addr_port}}</td>
                    <td>{{ c.remote_addr_host if c.remote_addr_host }}</td>
                    <td>{{ c.remote_addr_port if c.remote_addr_port}}</td>
                    <td>{{ c.state }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}
